package cn.droidlover.xdroidmvp.popwindow;

import android.app.Activity;
import android.text.TextUtils;
import android.widget.TextView;
import butterknife.BindView;
import cn.droidlover.xdroidmvp.R;


public class LoadingDialog extends DialogHelper {

    public static LoadingDialog dialog;
//
//    @BindView(R.id.tv_loads)
    TextView tv_load;

    public LoadingDialog(Activity context) {
        super(context, R.style.no_bg_dialog);
        getDialog().setCanceledOnTouchOutside(false);
    }

    public static LoadingDialog getInstance(Activity context) {
        if (dialog == null) {
            dialog = new LoadingDialog(context);
        }
        return dialog;
    }

    public void setContent(String content) {
        if (!TextUtils.isEmpty(content)) {
            tv_load = mContext.findViewById(R.id.tv_loads);
            tv_load.setText(content);
        }
    }


    @Override
    protected int getLayoutId() {
        return R.layout.dialog_loading;
    }

    @Override
    protected void initView() {
         tv_load = mContext.findViewById(R.id.tv_loads);

    }

    @Override
    public void dismiss() {
        super.dismiss();
        dialog = null;
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void dialogDismiss() {

    }
}
